#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QGraphicsScene>
#include <QGraphicsView>
#include "colorlabel.h"
#include "cshape.h"
#include "svgellipseitem.h"
#include "svglineitem.h"
#include "svgrectangleitem.h"
#include "svgbezieritem.h"
#include <QMainWindow>
#include <QSvgGenerator>
#include <QFileDialog>
#include <QPixmap>
#include <QImage>
#include <QPainter>
#include <QString>
#include <QWidget>
#include <QPropertyAnimation>
#include <QVBoxLayout>
#include <QColor>
#include <QDebug>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

protected:
    void BanBrush();
    void ActivateBrush();
    void BanSideWindow();
    void ActivateSideWindow();
private slots:
    void on_LineAction_triggered();

    void on_MouseSelectAction_triggered();

    void on_RectangleAction_triggered();

    void on_EllipseAction_triggered();

    void on_ClearAction_triggered();

    void on_SaveAction_triggered();

    void on_GridAction_triggered();

    void on_HandAction_triggered();

    void on_TriangleAction_triggered();

    void on_BeziterAction_triggered();

    void on_pushButton_clicked();

    void LineLabelClicked(const QColor color_input);
    void PadLabelClicked(const QColor color_input);

    void on_spinBox_valueChanged(int arg1);

    void resizeEvent(QResizeEvent *event) override;
    void NoBrushAction();
    void NormalBrushAction();


private:
    Ui::MainWindow *ui;
    QGraphicsScene scene;
    QGraphicsView view ;
    // 定义是否使用网格，默认为使用网格
    bool isGridOn;
    // 文件保存的路径
    QString FilePath;
    // 定义侧边栏的动画效果
    QPropertyAnimation* sidewidgetAnimation;
    // 定义移动侧边栏的按钮的动画效果
    QPropertyAnimation* pushButtonAnimation;
    // 定义侧边栏是否发生移动的变量
    bool isSideSlide;
    //QColor ForPad;
};
#endif // MAINWINDOW_H
